package com.alibaba.algo.dao.user;

import com.alibaba.algo.core.base.BaseMapper;
import com.alibaba.algo.entity.user.SysLabelOrg;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 标签岗位关系
 *
 * @author Songtinghua
 * @create 2021-11-01 9:25
 **/
public interface SysLabelOrgMapper extends BaseMapper<SysLabelOrg> {

    /**
     * 查询标签组织对应的行id
     *
     * @param sysLabelId label id
     * @param sysOrgId   org id
     * @return sysLabelOrg
     */
    SysLabelOrg selectByLabelIdAndOrgId(@Param("sysLabelId") Long sysLabelId, @Param("sysOrgId") Long sysOrgId);

    /**
     * 删除对应标签下的组织
     *
     * @param sysLabelId label id
     */
    void updateBySysLabelId(@Param("sysLabelId") Long sysLabelId);

    /**
     * 查询对应标签下的组织信息
     *
     * @param sysLabelId label id
     * @return list
     */
    List<SysLabelOrg> selectByLabelId(@Param("sysLabelId") Long sysLabelId);
}
